package util;
import geom.Vector;
public class VectorFilter {
	Filter xFilter;
	Filter yFilter;
	Filter zFilter;
	public VectorFilter(float weight) {
		xFilter = new Filter(weight);
		yFilter = new Filter(weight);
		zFilter = new Filter(weight);
	}
	
	public void setWeight(float weight){
		xFilter.setWeight(weight);
		yFilter.setWeight(weight);
		zFilter.setWeight(weight);
	}
	
	public Vector filter(Vector v){
		return new Vector(xFilter.filter(v.x), yFilter.filter(v.y), zFilter.filter(v.z));
	}
	
	public void setLastValue(Vector v){
		xFilter.setLastValue(v.x);
		yFilter.setLastValue(v.y);
		zFilter.setLastValue(v.z);
	}

}
